/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ru.jSkyRoom.support;

/**
 *
 * @author Rakev
 */
public class MajorEdidParser {

    private String edid;

    public MajorEdidParser(String edid) {
        this.edid = edid;
    }

    public int parseRang() {
        String levelStr = edid.substring(edid.length() - 2);
        if (levelStr.matches("\\d*")) {
            int level = Integer.valueOf(levelStr);
            return level;
        } else
            throw new IllegalStateException(edid+" does not contained rang.");
        
    }
}
